package edu.xmist.demo15.core;

import java.util.Map;

public class StatisticsFactory {

    private static final String statisticsType = "memory";

    public static Statistics getInstance() {
        return getInstance(statisticsType);
    }

    public static Statistics getInstance(String type) {
        switch (type) {
            case "db":
                return DbGlobalStatistics.getInstance();
            case "file2":
                return FileGlobalStatistics.getInstance();
            default:
                return MemoryGlobalStatistics.getInstance();
        }
    }
}
